package com.xdap.fsapproval.module.pojo;

import com.definesys.mpaas.query.annotation.*;
import com.definesys.mpaas.query.json.MpaasDateTimeDeserializer;
import com.definesys.mpaas.query.json.MpaasDateTimeSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.util.Date;

/**
 * @BelongsProject：IntelliJ IDEA
 * @BelongsPackage：com.adisseo.service.approval.module.pojo
 * @Author：fei
 * @CreateTime：2022-10-09 11:07
 * @Description: 飞书审批实例
 * @Version：1.0
 */
@Table("xdap_feishu.approval_instance_logs")
@Style
@Data
public class ApprovalInstanceLogs {

    /**
     * 主键id
     */
    @RowID(type = RowIDType.AUTO)
    private Integer id;
    /**
     * 状态
     */
    @Column("status")
    private String status;
    /**
     * 拥有者
     */
    @Column("owner")
    private String owner;
    /**
     * 行记录版本号
     */
    @SystemColumn(SystemColumnType.OBJECT_VERSION)
    @Column(value = "object_version_number")
    private Integer objectVersionNumber;
    /**
     * 行记录创建用户
     */
    @Column(value = "created_by")
    private String createdBy;
    /**
     * 行记录创建时间
     */
    @JsonDeserialize(
            using = MpaasDateTimeDeserializer.class
    )
    @JsonSerialize(
            using = MpaasDateTimeSerializer.class
    )
    @SystemColumn(SystemColumnType.CREATE_ON)
    @Column(value = "creation_date")
    private Date creationDate;
    /**
     * 行记录最后更新人
     */
    @Column(value = "last_updated_by")
    private String lastUpdatedBy;
    /**
     * 行记录最后更新时间
     */
    @JsonDeserialize(
            using = MpaasDateTimeDeserializer.class
    )
    @JsonSerialize(
            using = MpaasDateTimeSerializer.class
    )
    @SystemColumn(SystemColumnType.CREATE_ON)
    @Column(value = "last_update_date")
    private Date lastUpdateDate;

    /**
     * 表单业务数据id
     */
    @Column(value = "document_id")
    private String documentId;

    /**
     * 表单id
     */
    @Column(value = "form_id")
    private String formId;

    /**
     * pc端链接
     */
    @Column(value = "pc_link")
    private String pcLink;

    /**
     * 移动端链接
     */
    @Column(value = "mobile_link")
    private String mobileLink;

    private String webhookText;

    private String feishuApprovalText;

    private String errorLog;
}
